//
//  CIBNChannelCell.m
//  CIBN
//
//  Created by ZNGOO on 16/7/22.
//  Copyright © 2016年 韦儒健. All rights reserved.
//

#import "CIBNChannelCell.h"

@implementation CIBNChannelCell


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 0, frame.size.width-20, frame.size.height-20)];
        self.imageView.layer.cornerRadius = (frame.size.height-20)/2;
        self.imageView.clipsToBounds = YES;
        [self addSubview:self.imageView];
        
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, frame.size.height - 20, frame.size.width, 20)];
        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.font = [UIFont systemFontOfSize:14];
        [self addSubview:self.label];
    }
    
    return self;
}

- (void)setCellsModel:(CIBNMenuListModel *)model{
    
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://42.62.117.43:8080/play?fid=%@",model.PicFID]]];
    self.label.text = model.Name;
}
@end
